package com.heart.house.user.common;

import com.heart.house.user.exception.WithTypeException;

/**
 * @author Luo Zhen
 * @create 2019-10-31 12:02
 */
public class UserException extends RuntimeException implements WithTypeException {

    private static final long serialVersionUID = 2327578463519972818L;

    private Type type;

    public UserException(Type type, String msg) {
        super(msg);
        this.type = type;
    }

    public enum Type {
        USER_NOT_LOGIN,
        USER_NOT_FOUND,
        USER_AUTH_FAIL;
    }

    public Type getType() {
        return type;
    }
}
